package edu.zut.cs.network.Experiment2;

import javax.swing.JOptionPane;

public class ASCII_code {
    public static void main(String[] args) {
        String num = JOptionPane.showInputDialog("请输入一个0至127之间的整数：");
        int num1 = Integer.parseInt(num);

        char ch = (char)num1;
        JOptionPane.showMessageDialog(null,
                "该整数 "+num1+" 对应的ASCII码字符是："+ch,
                "ASCII码字符", JOptionPane.INFORMATION_MESSAGE);
    }
}
